home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ETO Development Tools 4
/
ETO Development Tools 4.iso
/
Tools - Objects
/
Virtual User 1.0
/
Example Scripts
/
ItemTracer.vu
< prev
next >
Wrap
Text File
|
1991-01-25
|
2KB
|
56 lines
#
# File: ItemTracer.vu
#
# Contains: This script traces the rectangle of the frontmost window and then traces the
# owning rectangle of each of the content items in the frontmost window (which
# VU can see). It prints out each content item's descriptor just before tracing
# its rectangle. This script is not generally useful in the sense of testing an
# application but it is useful in showing you what content items VU can see in a
# window and where it thinks they are.
#
# Conventions: Global variables begin with a capital letter
#
# Written by: Jay Jessen
#
# Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
#
# Change History:
#
# 5/17/90 JAS A few formatting changes, name change to ItemTracer.vu
#
# 4/3/89 Jay Jessen creation
#
# To Do:
#
task trace_rect(rect,speed_of_movement) begin
old_speed := mouseSpeed(speed_of_movement);
move absolute: { rect[1],rect[2] };
move absolute: { rect[3],rect[2] };
move absolute: { rect[3],rect[4] };
move absolute: { rect[1],rect[4] };
move absolute: { rect[1],rect[2] };
mouseSpeed(old_speed);
end;
##### EXECUTION STARTS HERE ######
The_mouse_speed := 2;
Initial_wait := 3;
move absolute: { 0, 0 };
wait(Initial_wait);
if match[window t:?Wind_title o:1 r:?Rect k: ?Contents_list]! begin
trace_rect(Rect,The_mouse_speed); # traces the window with the mouse
println "∂nwindow: ",Wind_title;
print "=========";
for i := 1 to card(Wind_title) print "=";
println;
for each Content_item in Contents_list begin
println Content_item;
trace_rect(Content_item.rect,The_mouse_speed);
end;
end;